<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>在线接口文档</title>
    <link rel="stylesheet" href="https://staticfile.qnssl.com/semantic-ui/2.1.6/semantic.min.css">
    <link rel="stylesheet" href="https://staticfile.qnssl.com/semantic-ui/2.1.6/components/table.min.css">
    <link rel="stylesheet" href="https://staticfile.qnssl.com/semantic-ui/2.1.6/components/container.min.css">
    <link rel="stylesheet" href="https://staticfile.qnssl.com/semantic-ui/2.1.6/components/message.min.css">
    <link rel="stylesheet" href="https://staticfile.qnssl.com/semantic-ui/2.1.6/components/label.min.css">
    <link rel="icon" href="/favicon.ico" type="image/x-icon" />

    <script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery.cookie/1.4.1/jquery.cookie.min.js"></script>
</head>
<body>
<br />
    <div class="ui text container" style="max-width: none !important;">
        <div class="ui floating message">

<h2 class='ui header'>接口：<{$service}></h2><br/> <span class='ui teal tag label'><{$description}></span>
            <div class="ui raised segment">
                <span class="ui red ribbon label">接口说明</span>
                <div class="ui message">
                    <p><{$descComment}></p>
                </div>
            </div>
            <h3><i class="sign in alternate icon"></i>接口参数</h3>
            <table class="ui red celled striped table" >
                <thead>
                    <tr><th>参数名字</th><th>类型</th><th>是否必须</th><th>默认值</th><th>其他</th><th>说明</th></tr>
                </thead>
                <tbody>
                <{foreach $rules as $key => $rule}>
                <tr><td><{$rule.name}></td><td><{$rule.type}></td><td><{if $rule['require']}><p color="red">必须</p><{else}>可选<{/if}></td>
                <td><{$rule.default}></td><td><{$rule.other}></td><td><{$rule.desc}></td></tr>
                <{/foreach}>
                </tbody>
            </table>
            <h3><i class="sign out alternate icon"></i>返回结果</h3>
            <table class="ui green celled striped table" >
                <thead>
                    <tr><th>返回字段</th><th>类型</th><th>说明</th></tr>
                </thead>
                <tbody>

                <{foreach $returns as $item}>
<tr><td><{$item[0]}></td><td><{$item[1]}></td><td><{$item[2]}></td></tr>
                <{/foreach}>
            </tbody>
        </table>
        <{if $exceptions}>
            <h3><i class="bell icon"></i>异常情况</h3>
            <table class="ui red celled striped table" >
                <thead>
                    <tr><th>错误码</th><th>错误描述信息</th>
                </thead>
                <tbody>
                <{foreach $exceptions as $exItem}>
                <tr><td><{$exItem[0]}></td><td><{$exItem[1]}></td></tr>
                <{/foreach}>
                </tbody>
        </table>
        <{/if}>
        <div class="ui fluid action input">
            <input placeholder="请求的接口链接" id="url" type="text" name="request_url" value="<{$url}>" >
            <button class="ui button green" id="copy" >复制接口地址</button>
        </div>
        <p>&copy; Code With ❤️ By Rei</p>
        <br />
    </div>

        <script>
            $('#copy').click(function () {
                var input = document.createElement('input');
                document.body.appendChild(input);
                input.setAttribute('value', $('#url').val());
                input.select();

                if (document.execCommand('copy')) {
                    document.execCommand('copy');
                }
                document.body.removeChild(input);
            });
        </script>
</body>
</html>